package com.liuceng.rabbitmq.service;

import org.springframework.amqp.core.AmqpTemplate;
import org.springframework.amqp.core.Message;
import org.springframework.amqp.core.MessageListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.remoting.support.RemoteInvocation;
import org.springframework.remoting.support.RemoteInvocationResult;
import org.springframework.stereotype.Service;


@Service
public class RabbitmqService implements MessageListener{
//    @Autowired
//    private AmqpTemplate amqpTemplate;
//
//    public void getRabbitmq1(Message message){
//        System.out.println("1-----------------"+new String(message.getBody()));
//    }
//
//    public void getRabbitmq2(Message message){
//        System.out.println("2-----------------"+new String(message.getBody()));
//    }

   @Override
   public void onMessage(Message message) {
    System.out.println("DetailQueueConsumer: " + new String(message.getBody()));
  }
}
